import request from '@/utils/request'


export function getLeaveRetireAverageTime() {
  return request({
    url: '/system/leaveRetire/getAverage',
    method: 'get'
  })
}


export function getLeaveRetirePeopleNum() {
  return request({
    url: '/system/leaveRetire/getPeopleNum',
    method: 'get'
  })
}


// 查询离退休申请列表
export function listLeaveRetire(query) {
  return request({
    url: '/system/leaveRetire/list',
    method: 'get',
    params: query
  })
}

// 查询离退休申请详细
export function getLeaveRetire(id) {
  return request({
    url: '/system/leaveRetire/' + id,
    method: 'get'
  })
}

// 新增离退休申请
export function addLeaveRetire(data) {
  return request({
    url: '/system/leaveRetire',
    method: 'post',
    data: data
  })
}

// 修改离退休申请
export function updateLeaveRetire(data) {
  return request({
    url: '/system/leaveRetire',
    method: 'put',
    data: data
  })
}

// 删除离退休申请
export function delLeaveRetire(id) {
  return request({
    url: '/system/leaveRetire/' + id,
    method: 'delete'
  })
}
